Recently, discussions about energy and global warming have significantly increased the focus on renewable energy. One of the suitable options for this purpose is the use of multigeneration systems with solar and geothermal energy sources. In this research, a multigeneration system for hydrogen, cooling, heating and power production based on the organic Rankine cycle, absorption chiller cycle dryer, and the proton exchange membrane (PEM) electrolyzer is investigated from thermodynamic and thermoeconomic points of view. In the organic Rankine cycles (ORC), a thermoelectric generator (TEG) unit is applied instead of a condenser, and different working fluids are tested to study their performance on the system. All the simulations are carried out using the Engineering Equation Solver (EES) software. The impact of different factors on the efficiency of the multigeneration system is investigated. The system's energetic efficiency is measured at 41.58%, while its exergetic efficiency stands at 25.61%, according to the findings. Moreover, by using the TEG unit, 466.4 kW extra power is obtained. Furthermore, the system can generate 493.1 kg/day hydrogen. From an exergy destruction perspective, the solar collector and the PEM electrolyzer exhibit the highest amounts. Finally, it is demonstrated that the geothermal temperature and turbine inlet temperature positively impact the system’s performance, while collector inlet temperature leads to a decrease in performance.